package com.etc.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.etc.dao.PatientloginMapper;
import com.etc.entity.Patientlogin;
import com.etc.service.PatientLoginService;
@Service(value="patientloginService")
public class PatientLoginServiceImpl implements PatientLoginService{
	@Autowired
	private PatientloginMapper patientloginMapper;
    /**
     * ���Ӳ���
     */

	@Override
	public int insertPatientLogin(Patientlogin record) {
		// TODO Auto-generated method stub
		return patientloginMapper.insert(record);
	}
	@Override
	public int delPatientLoginBykey(Integer patientid) {
		// TODO Auto-generated method stub
		return patientloginMapper.deleteByPrimaryKey(patientid);
	}
	/**
	 * 登录
	 * 根据用户密码查询病人对象
	 */
	@Override
	public Patientlogin getPatientLoginbyId(String patientloginid, String userpwd) {
		// TODO Auto-generated method stub
		return patientloginMapper.selectByPrimaryKey(patientloginid, userpwd);
	}
	@Override
	public boolean addPatient(Patientlogin patientlogin) {
		boolean flag=patientloginMapper.addPatient(patientlogin);
		return  flag;
	}
	@Override
	public Patientlogin selPatientById(String patientloginid) {
		// TODO Auto-generated method stub
		return patientloginMapper.selectPatientById(patientloginid);
	}
	
	
	
	
	
	
	
	
	
	
	

	
	
}
